@prefix-cls: ~'inbiz-cListCard';

.@{prefix-cls} {
  margin: 20px 0;

  .ant-checkbox-group,
  .ant-radio-group {
    display: block;
  }

  .list-selection-row {
    margin-bottom: 10px;
  }

  .list-card-body {
    &.ant-row {
      margin-right: unset !important;
      margin-left: unset !important;
    }
  }

  .list-card-item {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 112px;
    height: 120px;
    margin: 18px 20px 18px 0;
    padding: 8px;
    overflow: hidden;
    cursor: pointer;
    &.large {
      width: 196px;
      height: 241px;
      .list-card-doc-icon {
        width: auto;
        height: auto;
        &.error {
          width: 64px;
          height: 64px;
        }
      }
      .list-card-thumb {
        flex: 0 0 180px;
      }
    }
    > .ant-radio-wrapper,
    > .ant-checkbox-wrapper {
      position: relative;
      z-index: 1;
      display: block;
      height: 16px;
      margin: 0;
      line-height: 16px;
      text-align: right;
      visibility: hidden;
      .ant-radio,
      .ant-checkbox {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 16px;
      }
    }
    &:hover,
    &.checked {
      background-color: #f5f5f5;
      > .ant-radio-wrapper,
      .ant-checkbox-wrapper {
        visibility: visible;
      }
    }

    .list-card-doc-icon {
      width: 48px;
      height: 48px;
    }

    .list-card-item-bottom {
      display: -webkit-box;
      height: 35px;
      margin-top: 8px;
      padding: 0;
      overflow: hidden;
      color: #333;
      font-size: 12px;
      line-height: 19px;
      text-align: center;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      > .list-card-doc-icon {
        width: 16px;
        height: 16px;
        margin-right: 5px;
        line-height: 19px;
      }
      a {
        color: inherit;
        word-break: break-all;
        &:hover {
          text-decoration: underline;
        }
      }
    }

    .list-card-thumb {
      z-index: 2;
      display: flex;
      flex: 1;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      user-select: none;
    }
  }

  .card-checked .ant-card-cover {
    border-color: var(--inbiz-color-primary);
  }

  .ant-list-item {
    display: inline-block;
    width: 182px;
    height: 228px;
    margin-right: 16px;
    margin-bottom: 10px;
    padding: 0;

    &:hover {
      background-color: transparent;

      .ant-checkbox-inner {
        border-color: var(--inbiz-color-primary);
      }

      .ant-card-cover {
        border-color: var(--inbiz-color-primary);
      }
    }
  }

  .ant-card-body {
    padding: 10px 0 10px 0;
    text-align: center;
  }

  .ant-card-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 178px;
    border: 1px solid #f0f0f0;

    & img {
      width: 48px;
    }
  }

  .ant-card {
    position: relative;
  }

  .ant-card-head {
    height: 0;
    min-height: auto;
    padding: 0;
    text-align: right;
  }

  .ant-card-head-title {
    position: absolute;
    top: -6px;
    right: 0;
    padding: 0;
  }

  .ant-card-meta-title {
    font-size: 13px;
    line-height: 19px;
  }

  .ant-card-meta-title a {
    color: #666;
    font-weight: normal;

    &:hover {
      color: var(--inbiz-color-primary);
    }
  }

  .ant-list-split .ant-list-item {
    border-bottom: none;
  }
}
